Map Types with ggmap
Jan-Philipp Kolb
Wed Sep 16 08:25:56 2015
Outline
Various map types:
There are more which will be presented next week…
The R-package ggmap will be used in the following to produce different types of maps with the command qmap
Road maps
Source
A road map is one of the most widely used map types.
- These maps show major and minor highways and roads (depending on detail)
- as well as things like airports, city locations and points of interest like parks, campgrounds and monuments.
- Major highways on a road map are generally red and larger than other roads,
- while minor roads are a lighter color and a narrower line.
Install the library
- We’ll need package ggmap - so we have to install it:
- possibility
install.packages("ggmap")
- possibility:


Library ggmap - Hello world
- To load the library we use the command
library
library(ggmap)
qmap("Mannheim")

Map for a sight
qmap("Berlin Brandenburger Tor")

Map for a whole country
qmap("Germany")

- We need another zoom level
Use another zoom level
- level 3 - continent
- level 10 - city
- level 21 - building
qmap("Germany", zoom = 6)

Get help with the questionmark
?qmap
Different components in the help
- Description
- Usage
- Arguments
- Value
- Author(s)
- See Also
- Examples
The examples section of help
Extract from the help file on qmap:

This examples can be directly copy-pasted to the console
qmap("baylor university")
qmap("baylor university", zoom = 14)
# and so on
Other zoom level
qmap("Mannheim", zoom = 12)
